/*
 * Copyright (c) 2019.
 * http://www.ulabcare.com
 */

package com.mt.roll.passport.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * 统一用户配置
 *
 * @author jiff
 * @date 2018/11/1
 * @since 1.0
 */
@ConfigurationProperties("roll.passport")
@Validated
@Data
@Component
public class PassportConfig {
    /**
     * 忽略认证的接口地址，此处配置的地址不做认证和鉴权处理，如果会话存在则返回当前用户信息
     */
    @NotNull
    @Valid
    private List<String> ignoreAuthentications = new ArrayList<>();
    /**
     * 忽略鉴权的接口地址，此处配置的地址只做认证不做鉴权，如果认证通过返回当前用户信息
     */
    @NotNull
    @Valid
    private List<String> ignoreAuthorizations = new ArrayList<>();

}
